// 自动生成模板WorkflowData
package system1

import (
	"github.com/flipped-aurora/gin-vue-admin/server/global"
)

// 审批数据 结构体  WorkflowData
type WorkflowData struct {
	global.GVA_MODEL
	WorkflowdefId         int           `json:"workflowdef_id" form:"workflowdef_id" gorm:"column:workflowdef_id;comment:;"`       //审批定义表内id
	WorkflowdefName       string        `json:"workflowdef_name" form:"workflowdef_name" gorm:"column:workflowdef_name;comment:;"` //流程定义名称
	SubmitterId           int           `json:"submitterId" form:"submitterId" gorm:"column:submitter_id;comment:;"`               //提交人id
	State                 string        `json:"state" form:"state" gorm:"column:state;comment:;"`                                  //状态(running,rejected,done)
	Title                 string        `json:"title" gorm:"type:text;column:title;comment:;"`
	Flow                  string        `json:"flow" gorm:"type:text;column:flow;comment:;"`
	SubmitterDepartmentId int           `json:"submitterDepartmentId" form:"submitterDepartmentId" gorm:"column:submitter_department_id;comment:;"` //提交人部门id
	CreatedBy             uint          `gorm:"column:created_by;comment:创建者"`
	UpdatedBy             uint          `gorm:"column:updated_by;comment:更新者"`
	DeletedBy             uint          `gorm:"column:deleted_by;comment:删除者"`
	WorkflowLog           []WorkflowLog `gorm:"foreignKey:WorkflowDataId;references:ID"`
}

// TableName 审批数据 WorkflowData自定义表名 workflow_data_struct
func (WorkflowData) TableName() string {
	return "workflow_data"
}
